import Taro, { Component } from '@tarojs/taro'
import { View, Text } from '@tarojs/components'
import './index.scss'

import * as Api from '@/api/home'

export default class Index extends Component {
  config = {
    navigationBarTitleText: '首页'
  }

  componentDidShow() {
    this.fetchData()
  }

  fetchData = async () => {
    const data = await Api.fetchHome()
    console.log(data)
  }

  render() {
    return (
      <View className='index'>
        <Text>Hello world!</Text>
      </View>
    )
  }
}
